- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10
Allow cluster admins to opt-out of ServiceX user management system #73
base: develop
Are you sure you want to change the base?
Conversation
| One bump in the road: the  @bbockelm - for Coffea casa, do users have unique integer IDs that could be passed as the identity claim? Or do they only have a sub? EDIT: Nevermind, I think this will be fairly tricky, since the  | 
dfd99a8    to
    808fa86      
    Compare
  
    …management system
808fa86    to
    c877a8b      
    Compare
  
    | Codecov Report
 @@             Coverage Diff             @@
##           develop      #73      +/-   ##
===========================================
+ Coverage    91.04%   91.90%   +0.85%     
===========================================
  Files           49       49              
  Lines         1329     1371      +42     
  Branches       108      117       +9     
===========================================
+ Hits          1210     1260      +50     
+ Misses         106       98       -8     
  Partials        13       13              
 Continue to review full report at Codecov. 
 | 
864703f    to
    c877a8b      
    Compare
  
    4f0a796    to
    06d86c9      
    Compare
  
    | This is ready; we now have full test coverage and I've added some more instructions on how to generate the tokens. I've also tested manually with refresh tokens generated externally using the jwt.io debugger with the HS256 algorithm and our default  | 
| @AndrewEckart if you want I can quickly deploy it in dev namespace in flux? | 
| Do you have somewhere pushed image I should use? | 
| 
 Yes please! Keep in mind that you'll need the  | 
| Ah, since we deploying servicex from chart repo (as a dependency of coffea-casa), it will be hard... | 
| What is the status of this? Is @oshadura using it on coffea-casa? | 
| @BenGalewsky I will try to retest it ASAP, thanks for reminder! | 
As discussed in ssl-hep/ServiceX#217 with @bbockelm, clusters / analysis facilities with their own authentication system may wish to opt-out of the authentication system which is currently built into ServiceX (OAuth via Globus + user table in PSQL database).
This PR facilitates this use case by adding a new config value called
DISABLE_USER_MGMT. When toggled, the authentication decorators will only check for a valid JWT - they will not check against the database to make sure the user exists, is not pending, is an admin, etc.If this flag is used, cluster admins must generate JWT refresh tokens using the same
JWT_SECRET_KEYand provide them to end users in some other way. ServiceX will still expect all API requests to protected endpoints to carry a JWT access token, which is obtained by the Python client in the same fashion as usual using the refresh token.This flag renders many other config values associated with the user management system irrelevant (those for Slack, Globus, Mailgun, etc.) as well as their related endpoints. It does nothing if
ENABLE_AUTHis set to False, in which case there is no user management system, internal or external.